﻿using System;

namespace ConceptualSample
{
    class Program
    {
        static void Main(string[] args)
        {
            // 客户端代码可以用参数化i形式调用命令
            Invoker invoker = new Invoker();
            invoker.SetOnStart(new SimpleCommand("打个招呼"));
            Receiver receiver = new Receiver();
            invoker.SetOnFinish(new ComplexCommand(receiver, "发邮件", "保存报告"));

            invoker.DoSomethingImportant();
        }
    }
}
